package com.lan.mall.provider.controller;

import com.lan.mall.common.bean.User;
import com.lan.mall.common.utils.R;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@RefreshScope
public class UserController {

    @RequestMapping("/getUser")
    public R getUser(@RequestParam(required = false, value = "appName") String appName){
        return R.success(new User(1, appName, 20));
    }

    @RequestMapping("/hello")
    public R providerHello(){
        return R.success("providerHello");
    }
}
